package com.company.store;

import com.company.pojo.Pizza;
import com.company.pojo.concrete.CheesePizza;
import com.company.pojo.concrete.ClamPizza;
import com.company.pojo.concrete.VeggiePizza;

/**
 * 披萨店
 */
public class PizzaStore {

    public void orderPizza(String type) {
        Pizza pizza = null;

        if("cheese".equals(type)) {
            pizza = new CheesePizza();
        } else if ("clam".equals(type)) {
            pizza = new ClamPizza();
        } else if("veggie".equals(type)) {
            pizza = new VeggiePizza();
        }

        pizza.serveStep();
    }

}
